/**
 * 抓取北京信用卡信息
 * @type {{}}
 */
var commonUtils = {
    /**
     * 调用验证错误提示公用方法
     * @param isValidFlag
     * @param errorDec
     * @param teskKey
     */
    isValidThorwError:function (isValidFlag, errorDec) {
        var isSmsCodeCorrectFunc = function() {
            return isValidFlag;
        }

        var getSmsCodeErrorMsgFunc = function(isValidFlag) {
            return errorDec;
        }

        assertTrueOrThrowException(isValidFlag, isSmsCodeCorrectFunc, getSmsCodeErrorMsgFunc)
    },
    /**
     * 查找几个月的数据的月份集合，
     *
     * @return
     */
    getRecentMonth:function (num,simpleString,billDate) {
        var sdfBill = new SimpleDateFormat(simpleString);
        var dateList = new ArrayList();
        var calendar = Calendar.getInstance();
        for (var i = 0; i < num; i++) {
            var day = calendar.get(Calendar.DAY_OF_MONTH);
            day = Integer.parseInt(day);
            if (!equals("",billDate) && null !== billDate) {
                if (day <= Integer.parseInt(billDate)) {
                    calendar.add(Calendar.MONTH, -1);
                    dateList.add(sdfBill.format(calendar.getTime()));
                } else {
                    dateList.add(sdfBill.format(calendar.getTime()));
                    calendar.add(Calendar.MONTH, -1);
                }
            }
        }
        return dateList;
    }


}